Optimal. Leaf size=269 \[ \frac {3 a^3 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac {p+3}{2};\frac {p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac {a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac {p+1}{2};\frac {p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {3 a^3 \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+2}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)}+\frac {a^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+4}{2};\frac {p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2710, 3476, 364, 2602, 2577, 2591} \[ \frac {3 a^3 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac {p+3}{2};\frac {p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac {a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac {p+1}{2};\frac {p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {a^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+4}{2};\frac {p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)}+\frac {3 a^3 \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+2}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 364
Rule 2577
Rule 2591
Rule 2602
Rule 2710
Rule 3476
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx &=\int \left (a^3 (g \tan (e+f x))^p+3 a^3 \sin (e+f x) (g \tan (e+f x))^p+3 a^3 \sin ^2(e+f x) (g \tan (e+f x))^p+a^3 \sin ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx\\ &=a^3 \int (g \tan (e+f x))^p \, dx+a^3 \int \sin ^3(e+f x) (g \tan (e+f x))^p \, dx+\left (3 a^3\right ) \int \sin (e+f x) (g \tan (e+f x))^p \, dx+\left (3 a^3\right ) \int \sin ^2(e+f x) (g \tan (e+f x))^p \, dx\\ &=\frac {\left (a^3 g\right ) \operatorname {Subst}\left (\int \frac {x^p}{g^2+x^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac {\left (3 a^3 g\right ) \operatorname {Subst}\left (\int \frac {x^{2+p}}{\left (g^2+x^2\right )^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac {\left (a^3 \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{3+p}(e+f x) \, dx}{g}+\frac {\left (3 a^3 \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{1+p}(e+f x) \, dx}{g}\\ &=\frac {a^3 \, _2F_1\left (1,\frac {1+p}{2};\frac {3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {3 a^3 \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {2+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}+\frac {a^3 \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {4+p}{2};\frac {6+p}{2};\sin ^2(e+f x)\right ) \sin ^3(e+f x) (g \tan (e+f x))^{1+p}}{f g (4+p)}+\frac {3 a^3 \, _2F_1\left (2,\frac {3+p}{2};\frac {5+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{3+p}}{f g^3 (3+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 58.50, size = 5199, normalized size = 19.33 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.99, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (3 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} + {\left (a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3}\right )} \sin \left (f x + e\right )\right )} \left (g \tan \left (f x + e\right )\right )^{p}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 2.68, size = 0, normalized size = 0.00 \[ \int \left (a +a \sin \left (f x +e \right )\right )^{3} \left (g \tan \left (f x +e \right )\right )^{p}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int \left (g \tan {\left (e + f x \right )}\right )^{p}\, dx + \int 3 \left (g \tan {\left (e + f x \right )}\right )^{p} \sin {\left (e + f x \right )}\, dx + \int 3 \left (g \tan {\left (e + f x \right )}\right )^{p} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (g \tan {\left (e + f x \right )}\right )^{p} \sin ^{3}{\left (e + f x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________